package com.weigee.ktv.v.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.l.d.app.library.app.FragActivity;
import com.l.d.app.library.util.ToastUtil;
import com.weigee.ktv.R;
import com.weigee.ktv.v.activity.ActivityUtil;
import com.weigee.ktv.v.activity.StandardActivity;
import com.weigee.ktv.v.view.WrapTitleBar;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by 林德 on 2017/4/13 13:44.
 * <p/>
 */
public class WeigeeOthersMsgFragment extends BaseFragment implements View.OnClickListener
{
    @BindView(R.id.wrap_title_bar)
    WrapTitleBar mTitleBar;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
    {
        return inflater.inflate(R.layout.weigeeothersmsg_frag, container, false);
    }

    @Override
    protected void initView(View view, @Nullable Bundle savedInstanceState)
    {
        mTitleBar.setTitle("其他");
        mTitleBar.setLeftButtonListener(this);
    }

    @Override
    public void onClick(View v)
    {
        back();
    }

    /** 使用条款 */
    @OnClick(R.id.others_msg_terms_use)
    protected void onTermsUseClick(View view)
    {
        FragActivity.start(StandardActivity.class, view.getContext(), ActivityUtil.TERMS_USE);
    }

    /** 常见问题 */
    @OnClick(R.id.others_msg_common_problems)
    protected void onCommonProblemsClick(View view)
    {
        FragActivity.start(StandardActivity.class, view.getContext(), ActivityUtil.COMMON_PROBLEMS);
    }

    /** 关于我们 */
    @OnClick(R.id.others_msg_about_us)
    protected void onAboutUsClick(View view)
    {
        FragActivity.start(StandardActivity.class, view.getContext(), ActivityUtil.ABOUT_US);
    }

    /** 给好评 */
    @OnClick(R.id.others_msg_give_high_praise)
    protected void onGiveHighPraiseClick(View view)
    {
        ToastUtil.makeTest(view.getContext(), "给好评");
    }

    /** 登录/登出 */
    @OnClick(R.id.tv_sign_in_or_out)
    protected void onSignInOrOutClick(View view)
    {
        ToastUtil.makeTest(view.getContext(), "退出登录");
    }
}
